package com.artnology.independence.model.relationships;


import java.awt.BasicStroke;
import java.awt.Stroke;

import com.artnology.independence.Activator;
import com.artnology.independence.model.DVGraphModel;
import com.artnology.independence.model.DVPackage;
import com.artnology.independence.views.DependencyView;

public class DVPackageRelationship extends DVReference {
	public DVPackageRelationship(DVGraphModel model, DVPackage referencedPackage, DVPackage referenceFromPackage) {
		super(null, model, referencedPackage, referenceFromPackage);
	}
	
	@Override
	public String getLabel() {
		return "" + weight;
	}
	


	@Override
	public String getPrefix() {
		return "";
	}

	@Override
	public boolean crossesPackageBorder() {
		// this is by default the case for package relationships
		return true;
	}
	
	public Stroke getStroke() {
		if (Activator.getDefault().getPrefStore().getBoolean(DependencyView.INDICATE_CROSS_PACKAGE_EDGE)) {
			return new BasicStroke(weight);
		}
		return new BasicStroke(1.0f);
	}


	

	
	
	
	
	
}
